﻿using Crowler.Model.CoreComponents.DataAccess;
using NHibernate;

namespace CoreComponents.DataAccess
{
    public class SessionProvider:ISessionProvider  
    {
        private readonly IDataAccessManager _dataAccessManager;

        public SessionProvider(IDataAccessManager dataAccessManager)
        {
            _dataAccessManager = dataAccessManager;
        }

        public ISession Session
        {
            get { return _dataAccessManager.Current.Session; }
        }
    }
}
